//2009/09/23 10:16:13
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class OddDivisors
{
public:
    long long findSum(int n)
    {
        long long N = n;
        //long long v[N/2+1];
        //long long idx = 1;
        map<long long, long long> even;
        even[2] = 1;
        for (long long i=4; i<=N; i+=2)
        {
            if ((i/2) % 2 == 1) even[i] = i/2;
            else even[i] = even[i/2];
        }
        long long total = 0;
        for (long long i=1; i<=N; i++)
            if (i%2==1) total += i;
            else total += even[i];
        return total;
    }
};
/* 1000000000
 * //2009/09/23 10:16:13
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class OddDivisors
{
public:
    long long findSum(int n)
    {
		long long N = n;
		long long v[N+1];
		for(long long i=1 ;i<=N; i+=2)
			v[i] = i;
		for(long long i=2; i<=N; i+=2)
			v[i] = v[i/2];
		long long total = 0;
		for(long long i=1; i<=N; i++)
			total += v[i];
		return total;
    }
};*/
